package com.huarui.store.dao.impl;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.impl.BaseDaoImpl;
import com.huarui.store.dao.IStoreDao;
import com.huarui.store.model.Store;


public class StoreDaoImpl extends BaseDaoImpl implements IStoreDao {

	
	@SuppressWarnings("unchecked")
	public List getStoreByCompanyId(Integer companyId) {
		
		return this.getSqlMapClientTemplate().queryForList(namespace+".getStoreByCompanyId", companyId);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List getStoresByConditions(Map map){	
		
		return this.getSqlMapClientTemplate().queryForList(namespace+".getStoresByConditions",map);
		
		
	}

	@SuppressWarnings("unchecked")
	@Override
	public Integer getByConditionsForCount(Map map) {
		return (Integer) this.getSqlMapClientTemplate().queryForObject(namespace+".getByConditionsForCount",map);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List getAllStoresByConditions(Map map) {
		return this.getSqlMapClientTemplate().queryForList(namespace+".getAllStoresByConditions",map);
		
	}

	@Override
	public Store getByName(Map map) {
		
		return (Store)getSqlMapClientTemplate().queryForObject(namespace+".getByName",map);
	}

}
